<template>
  <div class="household-approval">
    <!-- 页面头部 -->
    <div class="page-header">
      <div class="header-content">
        <h1 class="page-title">
          <el-icon class="title-icon"><Document /></el-icon>
          户籍审批管理
        </h1>
        <p class="page-description">管理户籍相关申请的审批流程，包括出生申报、户口迁移、投靠等各类申请的审核处理</p>
      </div>
    </div>

    <!-- 统计卡片 -->
    <div class="stats-cards">
      <el-row :gutter="20">
        <el-col :span="6">
          <div class="stat-card pending">
            <div class="stat-icon">
              <el-icon><Clock /></el-icon>
            </div>
            <div class="stat-content">
              <div class="stat-number">{{ stats.pending }}</div>
              <div class="stat-label">待审批</div>
            </div>
          </div>
        </el-col>
        <el-col :span="6">
          <div class="stat-card approved">
            <div class="stat-icon">
              <el-icon><Check /></el-icon>
            </div>
            <div class="stat-content">
              <div class="stat-number">{{ stats.approved }}</div>
              <div class="stat-label">已通过</div>
            </div>
          </div>
        </el-col>
        <el-col :span="6">
          <div class="stat-card rejected">
            <div class="stat-icon">
              <el-icon><Close /></el-icon>
            </div>
            <div class="stat-content">
              <div class="stat-number">{{ stats.rejected }}</div>
              <div class="stat-label">已拒绝</div>
            </div>
          </div>
        </el-col>
        <el-col :span="6">
          <div class="stat-card total">
            <div class="stat-icon">
              <el-icon><Document /></el-icon>
            </div>
            <div class="stat-content">
              <div class="stat-number">{{ stats.total }}</div>
              <div class="stat-label">总申请</div>
            </div>
          </div>
        </el-col>
      </el-row>
    </div>

    <!-- 搜索和筛选 -->
    <div class="search-section">
      <el-card class="search-card">
        <el-form :model="searchForm" :inline="true" class="search-form">
          <el-form-item label="申请人姓名">
            <el-input v-model="searchForm.name" placeholder="请输入申请人姓名" clearable />
          </el-form-item>
          <el-form-item label="身份证号">
            <el-input v-model="searchForm.idCard" placeholder="请输入身份证号" clearable />
          </el-form-item>
          <el-form-item label="审批状态">
            <el-select v-model="searchForm.status" placeholder="请选择审批状态" clearable>
              <el-option label="待审核" :value="1" />
              <el-option label="已通过" :value="2" />
              <el-option label="已拒绝" :value="3" />
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="handleSearch">
              <el-icon><Search /></el-icon>
              搜索
            </el-button>
            <el-button @click="handleReset">
              <el-icon><Refresh /></el-icon>
              重置
            </el-button>
          </el-form-item>
        </el-form>
      </el-card>
    </div>

    <!-- 审批列表 -->
    <div class="approval-list">
      <el-card class="list-card">
        <template #header>
          <div class="card-header">
            <span class="card-title">审批申请列表</span>
            <div class="header-actions">
              <el-button type="primary" @click="handleBatchApprove" :disabled="!selectedRows.length">
                <el-icon><Check /></el-icon>
                批量通过
              </el-button>
              <el-button type="danger" @click="handleBatchReject" :disabled="!selectedRows.length">
                <el-icon><Close /></el-icon>
                批量拒绝
              </el-button>
            </div>
          </div>
        </template>

        <el-table
          :data="approvalList"
          v-loading="loading"
          @selection-change="handleSelectionChange"
          class="approval-table"
        >
          <el-table-column type="selection" width="55" />
          <el-table-column prop="id" label="申请编号" width="120" />
          <el-table-column prop="name" label="申请人" width="120" />
          <el-table-column prop="idCard" label="身份证号" width="180" />
          <el-table-column prop="phone" label="联系电话" width="130" />
          <el-table-column prop="transferReason" label="迁移原因" width="150" />
          <el-table-column prop="applicationDate" label="申请日期" width="120">
            <template #default="{ row }">
              {{ formatDate(row.applicationDate) }}
            </template>
          </el-table-column>
          <el-table-column prop="applicationStatus" label="审批状态" width="100">
            <template #default="{ row }">
              <el-tag :type="getStatusTagType(row.applicationStatus)">{{ getStatusLabel(row.applicationStatus) }}</el-tag>
            </template>
          </el-table-column>
          <el-table-column prop="approvalTime" label="审批时间" width="120">
            <template #default="{ row }">
              {{ row.approvalTime ? formatDate(row.approvalTime) : '-' }}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="240" fixed="right">
            <template #default="{ row }">
              <div class="action-buttons">
                <el-button type="primary" size="small" @click="handleView(row)">
                  <el-icon><View /></el-icon>
                  查看
                </el-button>
                <el-button 
                  v-if="row.applicationStatus === 1" 
                  type="success" 
                  size="small" 
                  @click="handleApprove(row)"
                >
                  <el-icon><Check /></el-icon>
                  通过
                </el-button>
                <el-button 
                  v-if="row.applicationStatus === 1" 
                  type="danger" 
                  size="small" 
                  @click="handleReject(row)"
                >
                  <el-icon><Close /></el-icon>
                  拒绝
                </el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>

        <!-- 分页 -->
        <div class="pagination-wrapper">
          <el-pagination
            v-model:current-page="pagination.currentPage"
            v-model:page-size="pagination.pageSize"
            :page-sizes="[10, 20, 50, 100]"
            :total="pagination.total"
            layout="total, sizes, prev, pager, next, jumper"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </div>
      </el-card>
    </div>

    <!-- 审批详情弹窗 -->
    <el-dialog
      v-model="detailVisible"
      :title="dialogTitle"
      width="800px"
      :before-close="handleCloseDetail"
    >
      <div v-if="currentApplication" class="approval-detail">
        <el-descriptions :column="2" border>
          <el-descriptions-item label="申请编号">{{ currentApplication.id }}</el-descriptions-item>
          <el-descriptions-item label="申请人">{{ currentApplication.name }}</el-descriptions-item>
          <el-descriptions-item label="身份证号">{{ currentApplication.idCard }}</el-descriptions-item>
          <el-descriptions-item label="联系电话">{{ currentApplication.phone }}</el-descriptions-item>
          <el-descriptions-item label="迁移原因">{{ currentApplication.transferReason }}</el-descriptions-item>
          <el-descriptions-item label="申请日期">{{ formatDate(currentApplication.applicationDate) }}</el-descriptions-item>
          <el-descriptions-item label="当前状态">
            <el-tag :type="getStatusTagType(currentApplication.applicationStatus)">
              {{ getStatusLabel(currentApplication.applicationStatus) }}
            </el-tag>
          </el-descriptions-item>
          <el-descriptions-item label="审批时间">
            {{ currentApplication.approvalTime ? formatDate(currentApplication.approvalTime) : '未审批' }}
          </el-descriptions-item>
        </el-descriptions>

        <div v-if="currentApplication.approvalRemark" class="detail-section">
          <h4>审批意见</h4>
          <p>{{ currentApplication.approvalRemark }}</p>
        </div>

        <div v-if="currentApplication.applicationStatus === 1" class="approval-actions">
          <h4>审批操作</h4>
          <el-form :model="approvalForm" label-width="80px">
            <el-form-item label="审批意见">
              <el-input
                v-model="approvalForm.comment"
                type="textarea"
                :rows="4"
                placeholder="请输入审批意见"
              />
            </el-form-item>
          </el-form>
        </div>
      </div>

      <template #footer>
        <div class="dialog-footer">
          <el-button @click="detailVisible = false">关闭</el-button>
          <el-button 
            v-if="currentApplication?.applicationStatus === 1" 
            type="success" 
            @click="handleDetailApprove"
          >
            通过
          </el-button>
          <el-button 
            v-if="currentApplication?.applicationStatus === 1" 
            type="danger" 
            @click="handleDetailReject"
          >
            拒绝
          </el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup>
import { ref, reactive, onMounted, computed } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import axios from 'axios'
import { API_BASE_URL } from '@/config/api'
import {
  Document,
  Clock,
  Check,
  Close,
  Search,
  Refresh,
  View
} from '@element-plus/icons-vue'

// 响应式数据
const loading = ref(false)
const detailVisible = ref(false)
const selectedRows = ref([])

// 统计数据
const stats = reactive({
  pending: 0,
  approved: 0,
  rejected: 0,
  total: 0
})

// 搜索表单
const searchForm = reactive({
  name: '',
  idCard: '',
  status: null
})

// 审批表单
const approvalForm = reactive({
  comment: ''
})

// 分页数据
const pagination = reactive({
  currentPage: 1,
  pageSize: 10,
  total: 0
})

// 当前查看的申请
const currentApplication = ref(null)

// 审批列表数据
const approvalList = ref([])

// 计算属性
const dialogTitle = computed(() => {
  return currentApplication.value ? `审批详情 - ${currentApplication.value.id}` : '审批详情'
})

// 方法
const getStatusLabel = (status) => {
  const labels = {
    1: '待审核',
    2: '已通过',
    3: '已拒绝'
  }
  return labels[status] || status
}

const getStatusTagType = (status) => {
  const types = {
    1: 'warning',
    2: 'success',
    3: 'danger'
  }
  return types[status] || ''
}

const formatDate = (date) => {
  if (!date) return '-'
  return new Date(date).toLocaleDateString('zh-CN')
}

// 获取审批列表数据
const fetchApprovalList = async () => {
  loading.value = true
  try {
    const token = localStorage.getItem('token')
    if (!token) {
      ElMessage.error('请先登录')
      return
    }
    
    const params = {
      pageNum: pagination.currentPage,
      pageSize: pagination.pageSize
    }
    
    // 添加搜索条件
    if (searchForm.name) {
      params.name = searchForm.name
    }
    if (searchForm.idCard) {
      params.idCard = searchForm.idCard
    }
    if (searchForm.status !== null && searchForm.status !== '') {
      params.status = searchForm.status
    }

    console.log('DEBUG: 发送请求参数:', params)
    
    const response = await axios.get(`${API_BASE_URL}/household/getHouseholdTransfer`, {
      params,
      headers: {
        'token': token
      }
    })

    console.log('DEBUG: 完整响应数据:', response.data)
    console.log('DEBUG: 响应状态:', response.data.status)
    console.log('DEBUG: 响应数据:', response.data.data)

    if (response.data.status === 200) {
      const data = response.data.data || []
      console.log('DEBUG: 解析后的审批列表数据:', data)
      approvalList.value = data
      
      // 更新分页总数（如果后端返回了总数信息）
      if (response.data.total !== undefined) {
        pagination.total = response.data.total
      } else {
        // 如果没有返回总数，使用当前数据长度作为估算
        pagination.total = data.length
      }
      
      // 更新统计数据
      updateStats()
    } else {
      console.error('DEBUG: 请求失败:', response.data.msg)
      ElMessage.error(response.data.msg || '获取数据失败')
    }
  } catch (error) {
    console.error('获取审批列表失败:', error)
    ElMessage.error('获取数据失败，请检查网络连接')
  } finally {
    loading.value = false
  }
}

// 更新统计数据
const updateStats = () => {
  const pending = approvalList.value.filter(item => item.applicationStatus === 1).length
  const approved = approvalList.value.filter(item => item.applicationStatus === 2).length
  const rejected = approvalList.value.filter(item => item.applicationStatus === 3).length
  
  stats.pending = pending
  stats.approved = approved
  stats.rejected = rejected
  stats.total = approvalList.value.length
}

const handleSearch = () => {
  pagination.currentPage = 1
  fetchApprovalList()
}

const handleReset = () => {
  Object.assign(searchForm, {
    name: '',
    idCard: '',
    status: null
  })
  pagination.currentPage = 1
  fetchApprovalList()
}

const handleSelectionChange = (selection) => {
  selectedRows.value = selection
}

const handleView = async (row) => {
  try {
    loading.value = true
    const token = localStorage.getItem('token')
    
    const response = await axios.get(`${API_BASE_URL}/household/getHouseholdTransferDetail/${row.id}`, {
      headers: {
        'token': token
      }
    })

    if (response.data.status === 200) {
      currentApplication.value = response.data.data
      detailVisible.value = true
    } else {
      ElMessage.error(response.data.msg || '获取详情失败')
    }
  } catch (error) {
    console.error('获取详情失败:', error)
    ElMessage.error('获取详情失败，请检查网络连接')
  } finally {
    loading.value = false
  }
}

const handleApprove = async (row) => {
  try {
    const { value: remark } = await ElMessageBox.prompt('请输入审批意见（可选）', '确认通过', {
      confirmButtonText: '通过',
      cancelButtonText: '取消',
      inputType: 'textarea',
      inputPlaceholder: '请输入审批意见...'
    })
    
    const token = localStorage.getItem('token')
    const approvalData = {
      transferId: row.id,
      applicationStatus: 2, // 2表示通过
      approvalRemark: remark || ''
    }
    
    const response = await axios.put(`${API_BASE_URL}/household/updateHouseholdTransfer`, approvalData, {
      headers: {
        'token': token,
        'Content-Type': 'application/json'
      }
    })
    
    if (response.data.status === 200) {
      ElMessage.success('审批通过')
      // 刷新列表
      fetchApprovalList()
    } else {
      ElMessage.error(response.data.msg || '审批失败')
    }
  } catch (error) {
    if (error !== 'cancel') {
      console.error('审批失败:', error)
      ElMessage.error('审批失败，请检查网络连接')
    }
  }
}

const handleReject = async (row) => {
  try {
    const { value: remark } = await ElMessageBox.prompt('请输入拒绝原因', '确认拒绝', {
      confirmButtonText: '拒绝',
      cancelButtonText: '取消',
      inputType: 'textarea',
      inputPlaceholder: '请输入拒绝原因...',
      inputValidator: (value) => {
        if (!value || value.trim() === '') {
          return '拒绝原因不能为空'
        }
        return true
      }
    })
    
    const token = localStorage.getItem('token')
    const approvalData = {
      transferId: row.id,
      applicationStatus: 3, // 3表示拒绝
      approvalRemark: remark
    }
    
    const response = await axios.put(`${API_BASE_URL}/household/updateHouseholdTransfer`, approvalData, {
      headers: {
        'token': token,
        'Content-Type': 'application/json'
      }
    })
    
    if (response.data.status === 200) {
      ElMessage.success('已拒绝申请')
      // 刷新列表
      fetchApprovalList()
    } else {
      ElMessage.error(response.data.msg || '审批失败')
    }
  } catch (error) {
    if (error !== 'cancel') {
      console.error('审批失败:', error)
      ElMessage.error('审批失败，请检查网络连接')
    }
  }
}

const handleBatchApprove = async () => {
  if (selectedRows.value.length === 0) {
    ElMessage.warning('请先选择要审批的记录')
    return
  }
  
  try {
    const { value: remark } = await ElMessageBox.prompt(`确认批量通过 ${selectedRows.value.length} 个申请吗？请输入审批意见（可选）`, '批量通过', {
      confirmButtonText: '批量通过',
      cancelButtonText: '取消',
      inputType: 'textarea',
      inputPlaceholder: '请输入审批意见...'
    })
    
    const token = localStorage.getItem('token')
    const promises = selectedRows.value.map(row => {
      const approvalData = {
        transferId: row.id,
        applicationStatus: 2, // 2表示通过
        approvalRemark: remark || ''
      }
      
      return axios.put(`${API_BASE_URL}/household/updateHouseholdTransfer`, approvalData, {
        headers: {
          'token': token,
          'Content-Type': 'application/json'
        }
      })
    })
    
    const results = await Promise.allSettled(promises)
    const successCount = results.filter(result => 
      result.status === 'fulfilled' && result.value.data.status === 200
    ).length
    const failCount = results.length - successCount
    
    if (successCount > 0) {
      ElMessage.success(`成功通过 ${successCount} 个申请${failCount > 0 ? `，${failCount} 个失败` : ''}`)
      // 刷新列表
      fetchApprovalList()
      // 清空选择
      selectedRows.value = []
    } else {
      ElMessage.error('批量审批失败')
    }
  } catch (error) {
    if (error !== 'cancel') {
      console.error('批量审批失败:', error)
      ElMessage.error('批量审批失败，请检查网络连接')
    }
  }
}

const handleBatchReject = async () => {
  if (selectedRows.value.length === 0) {
    ElMessage.warning('请先选择要拒绝的记录')
    return
  }
  
  try {
    const { value: remark } = await ElMessageBox.prompt(`确认批量拒绝 ${selectedRows.value.length} 个申请吗？请输入拒绝原因`, '批量拒绝', {
      confirmButtonText: '批量拒绝',
      cancelButtonText: '取消',
      inputType: 'textarea',
      inputPlaceholder: '请输入拒绝原因...',
      inputValidator: (value) => {
        if (!value || value.trim() === '') {
          return '拒绝原因不能为空'
        }
        return true
      }
    })
    
    const token = localStorage.getItem('token')
    const promises = selectedRows.value.map(row => {
      const approvalData = {
        transferId: row.id,
        applicationStatus: 3, // 3表示拒绝
        approvalRemark: remark
      }
      
      return axios.put(`${API_BASE_URL}/household/updateHouseholdTransfer`, approvalData, {
        headers: {
          'token': token,
          'Content-Type': 'application/json'
        }
      })
    })
    
    const results = await Promise.allSettled(promises)
    const successCount = results.filter(result => 
      result.status === 'fulfilled' && result.value.data.status === 200
    ).length
    const failCount = results.length - successCount
    
    if (successCount > 0) {
      ElMessage.success(`成功拒绝 ${successCount} 个申请${failCount > 0 ? `，${failCount} 个失败` : ''}`)
      // 刷新列表
      fetchApprovalList()
      // 清空选择
      selectedRows.value = []
    } else {
      ElMessage.error('批量拒绝失败')
    }
  } catch (error) {
    if (error !== 'cancel') {
      console.error('批量拒绝失败:', error)
      ElMessage.error('批量拒绝失败，请检查网络连接')
    }
  }
}

const handleDetailApprove = async () => {
  try {
    const remark = approvalForm.comment || ''
    
    const token = localStorage.getItem('token')
    const approvalData = {
      transferId: currentApplication.value.id,
      applicationStatus: 2, // 2表示通过
      approvalRemark: remark
    }
    
    const response = await axios.put(`${API_BASE_URL}/household/updateHouseholdTransfer`, approvalData, {
      headers: {
        'token': token,
        'Content-Type': 'application/json'
      }
    })
    
    if (response.data.status === 200) {
      ElMessage.success('审批通过')
      detailVisible.value = false
      // 刷新列表
      fetchApprovalList()
      // 重置表单
      approvalForm.comment = ''
    } else {
      ElMessage.error(response.data.msg || '审批失败')
    }
  } catch (error) {
    console.error('审批失败:', error)
    ElMessage.error('审批失败，请检查网络连接')
  }
}

const handleDetailReject = async () => {
  if (!approvalForm.comment || approvalForm.comment.trim() === '') {
    ElMessage.warning('拒绝时必须填写审批意见')
    return
  }
  
  try {
    const token = localStorage.getItem('token')
    const approvalData = {
      transferId: currentApplication.value.id,
      applicationStatus: 3, // 3表示拒绝
      approvalRemark: approvalForm.comment
    }
    
    const response = await axios.put(`${API_BASE_URL}/household/updateHouseholdTransfer`, approvalData, {
      headers: {
        'token': token,
        'Content-Type': 'application/json'
      }
    })
    
    if (response.data.status === 200) {
      ElMessage.success('已拒绝申请')
      detailVisible.value = false
      // 刷新列表
      fetchApprovalList()
      // 重置表单
      approvalForm.comment = ''
    } else {
      ElMessage.error(response.data.msg || '审批失败')
    }
  } catch (error) {
    console.error('审批失败:', error)
    ElMessage.error('审批失败，请检查网络连接')
  }
}

const handleCloseDetail = () => {
  approvalForm.comment = ''
  detailVisible.value = false
}

const handleSizeChange = (size) => {
  pagination.pageSize = size
  pagination.currentPage = 1
  fetchApprovalList()
}

const handleCurrentChange = (page) => {
  pagination.currentPage = page
  fetchApprovalList()
}

// 生命周期
onMounted(() => {
  fetchApprovalList()
})
</script>

<style scoped>
.household-approval {
  padding: 20px;
  background-color: #f5f7fa;
  min-height: 100vh;
}

/* 页面头部 */
.page-header {
  margin-bottom: 24px;
}

.header-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 32px;
  border-radius: 12px;
  color: white;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.page-title {
  display: flex;
  align-items: center;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.title-icon {
  margin-right: 12px;
  font-size: 32px;
}

.page-description {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
  line-height: 1.6;
}

/* 统计卡片 */
.stats-cards {
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  font-size: 24px;
}

.stat-card.pending .stat-icon {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #e67e22;
}

.stat-card.approved .stat-icon {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #27ae60;
}

.stat-card.rejected .stat-icon {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #e74c3c;
}

.stat-card.total .stat-icon {
  background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
  color: #8e44ad;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: #7f8c8d;
  font-weight: 500;
}

/* 搜索区域 */
.search-section {
  margin-bottom: 24px;
}

.search-card {
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.search-form {
  margin: 0;
}

/* 列表区域 */
.list-card {
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.approval-table {
  margin-top: 16px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

.action-buttons .el-button {
  margin: 0;
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* 详情弹窗 */
.approval-detail {
  padding: 16px 0;
}

.detail-section {
  margin-top: 24px;
  padding: 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.detail-section h4 {
  margin: 0 0 12px 0;
  color: #2c3e50;
  font-size: 16px;
}

.approval-actions {
  margin-top: 24px;
  padding: 16px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.approval-actions h4 {
  margin: 0 0 16px 0;
  color: #2c3e50;
  font-size: 16px;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .household-approval {
    padding: 12px;
  }
  
  .header-content {
    padding: 20px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-number {
    font-size: 24px;
  }
}
</style>